package org.nViron.nvParams;

/**
 * Manager and generator of context parameters
 * @author Roland Haring <p>
 * <script type="text/javascript" src="http://www.ohloh.net/p/376434/widgets/project_basic_stats.js"></script>
 */
public class nvContextParamMgr extends nvParamMgr {
    public enum CONTEXTPARAM {
        INVALID, ADDRESSE, OTH_ADDRESSES, CREATOR, ADDRESSE_FRIEND, CREATOR_FRIEND, CATEGORIES_SELECTED, CURSOR_DIST,
        USER_DIST, SEARCH_RESULT, MIME_TYPE, AGE, UNREAD, ALERT, REMINDER, POPULARITY, RATING, READ_FREQ, USER_RATING,
        DELTA_V, REGIONALITY, ORIENTATION, SELECTION_SIMILARITY, SELECTED
    }

    ;
    public nvContextParamMgr() {
        super();
    }

    @Override
    protected void generateDefaultParams() {
        add(CONTEXTPARAM.ADDRESSE,
            new nvContextParam(CONTEXTPARAM.ADDRESSE, "Addressee", "User is Addressee of Information", this));
        add(CONTEXTPARAM.OTH_ADDRESSES,
            new nvContextParam(CONTEXTPARAM.OTH_ADDRESSES, "Other Addressees", "Number of other Addressees", this));
        add(CONTEXTPARAM.CREATOR,
            new nvContextParam(CONTEXTPARAM.CREATOR, "Creator", "User is creator of information", this));
        add(CONTEXTPARAM.ADDRESSE_FRIEND,
            new nvContextParam(CONTEXTPARAM.ADDRESSE_FRIEND, "Addresse friend", "Addresse is a friend of the user",
                               this));
        add(CONTEXTPARAM.CREATOR_FRIEND,
            new nvContextParam(CONTEXTPARAM.CREATOR_FRIEND, "Creator friend", "Creator is a friend of the user", this));
        add(CONTEXTPARAM.CATEGORIES_SELECTED,
            new nvContextParam(CONTEXTPARAM.CATEGORIES_SELECTED, "Categories selcted",
                               "Information's categories are selected", this));
        add(CONTEXTPARAM.CURSOR_DIST,
            new nvContextParam(CONTEXTPARAM.CURSOR_DIST, "Cursor distance", "Distance from information to cursor",
                               this));
        add(CONTEXTPARAM.USER_DIST,
            new nvContextParam(CONTEXTPARAM.USER_DIST, "User distance", "Distance between user and information", this));
        add(CONTEXTPARAM.SEARCH_RESULT,
            new nvContextParam(CONTEXTPARAM.SEARCH_RESULT, "Search result", "Information is result of a search", this));
        add(CONTEXTPARAM.MIME_TYPE,
            new nvContextParam(CONTEXTPARAM.MIME_TYPE, "MIME Type", "MIME Type is selected", this));
        add(CONTEXTPARAM.AGE, new nvContextParam(CONTEXTPARAM.AGE, "Age", "Age of Information", this));
        add(CONTEXTPARAM.UNREAD, new nvContextParam(CONTEXTPARAM.UNREAD, "Unread", "Had not been read by user", this));
        add(CONTEXTPARAM.ALERT, new nvContextParam(CONTEXTPARAM.ALERT, "Alert", "Informations pops up", this));
        add(CONTEXTPARAM.REMINDER,
            new nvContextParam(CONTEXTPARAM.REMINDER, "Reminder", "Information is an active reminder", this));
        add(CONTEXTPARAM.POPULARITY,
            new nvContextParam(CONTEXTPARAM.POPULARITY, "Overall Popularity",
                               "How often had information been read by all users?", this));
        add(CONTEXTPARAM.RATING,
            new nvContextParam(CONTEXTPARAM.RATING, "Overall Rating", "How was information rated by users?", this));
        add(CONTEXTPARAM.READ_FREQ,
            new nvContextParam(CONTEXTPARAM.READ_FREQ, "Read Freqeuncy", "How often was information read by user?",
                               this));
        add(CONTEXTPARAM.USER_RATING,
            new nvContextParam(CONTEXTPARAM.USER_RATING, "Rating", "How was information rated by user?", this));
        add(CONTEXTPARAM.DELTA_V,
            new nvContextParam(CONTEXTPARAM.DELTA_V, "Delta Speed",
                               "Delta between current user speed and speed at which information was created", this));
        add(CONTEXTPARAM.REGIONALITY,
            new nvContextParam(CONTEXTPARAM.REGIONALITY, "Regionality",
                               "How close was creator to the actual position of the information, when it was created?",
                               this));
        add(CONTEXTPARAM.ORIENTATION,
            new nvContextParam(CONTEXTPARAM.ORIENTATION, "Orientation",
                               "Orientation of information set in context to those of the user", this));
        add(CONTEXTPARAM.SELECTED,
            new nvContextParam(CONTEXTPARAM.SELECTED, "Currently selected", "Is information selected currently?",
                               this));
        add(CONTEXTPARAM.SELECTION_SIMILARITY,
            new nvContextParam(CONTEXTPARAM.SELECTION_SIMILARITY, "Similarity with Selection",
                               "How similar is this information to currently selected one?", this));
    }

    public nvContextParam getParam(CONTEXTPARAM param) {
        return (nvContextParam) get(param);
    }

    public nvContextParam getParam(int index) {
        return (nvContextParam) get(index);
    }
}



